package cn.pli.bike.ui;

import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

import com.framemodule.base.BaseDelegate;

import cn.pli.bike.R;

/**
 * Created by shangdongzhou on 2017/11/8.
 */

public class PhoneLogonDelegate extends BaseDelegate {
    private TextView tvTitle;
    private EditText etPhone;
    private EditText etVerification;
    private Button btSendVerification, btCommit;
    private TextView tvUserAgreement;

    @Override
    public void initTitleBar() {

    }

    @Override
    public int getRootLayoutId() {
        return R.layout.activity_phone_logon;
    }

    @Override
    public void initWidget() {
        super.initWidget();
        tvTitle = get(R.id.tv_title);
        tvTitle.setText("登陆注册");

        etPhone = get(R.id.et_phone_num);
        etVerification = get(R.id.et_verif_code);
        btSendVerification = get(R.id.bt_send_verification);
        btCommit = get(R.id.bt_commit);
        tvUserAgreement = get(R.id.tv_user_agreement);
        setButtonEnable(false);
    }

    public void setButtonEnable(boolean enable) {

        btCommit.setEnabled(enable);
        btSendVerification.setEnabled(enable);
    }


    public EditText getEtPhone() {
        return etPhone;
    }

    public EditText getEtVerification() {
        return etVerification;
    }

    public Button getBtSendVerification() {
        return btSendVerification;
    }

    public Button getBtCommit() {
        return btCommit;
    }
}
